<!DOCTYPE html>
<html lang="en">
  <head>
    <meta charset="UTF-8" />
    <meta name="viewport" content="width=device-width, initial-scale=1.0" />
    <title>Document</title>
    <style>
      body {
        height: 1500px;
      }
    </style>
  </head>
  <body>
    <script>
      document.addEventListener("click", function (e) {
        //1.client 可视区
        console.log("可视区X:" + e.clientX);
        console.log("可视区Y:" + e.clientY);
        console.log("-----------------------------------------------------------------------");
        //2.page 可视区+滚动条
        console.log("可视区PageX:" + e.pageX);
        console.log("可视区PageY:" + e.pageY);
         console.log("-----------------------------------------------------------------------");
        //3.screen 屏幕
        console.log("可视区ScreenX:" + e.screenX);
        console.log("可视区ScreenY:" + e.screenY);
          console.log("-----------------------------------------------------------------------");
        // //4.target 触发对象
        // console.log("可视区X:" + e.target);
        // console.log("可视区Y:" + e.target);
        // //5.currentTarget 绑定对象
        // console.log("可视区X:" + e.currentTarget);
        // console.log("可视区Y:" + e.currentTarget);
        // //6.offsetX 鼠标相对于触发对象
        // console.log("可视区X:" + e.offsetX);
        // console.log("可视区Y:" + e.offsetY);
      });
    </script>
  </body>
</html>
